﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PloobsEngine.Factories
{
    /// <summary>
    /// Representa uma factory generica
    /// </summary>
    public interface IFactory
    {
        /// <summary>
        /// Verifica se esta factory pode cuidar desta request
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        bool CanHandle(IRequest request);
        /// <summary>
        /// Devolve o objeto referente a request passada
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        object getObject(IRequest request);

        /// <summary>
        /// Inicializa a Factory - chamada uma vez na criacao da factory
        /// </summary>
        /// <param name="engine"></param>
        void Init(EngineStuff engine);
    }
}
